import type { Dayjs } from "dayjs";

export type TaskType = "Task" | "Milestone" | "Project";
export type TaskMode = "Day" | "Week" | "Month" | "Quarter" | "Year";

export interface TaskProps {
  id: string;
  name: string;
  start: Dayjs;
  end: Dayjs;
  progress: number;
  type: TaskType;
  backgroundColor: string;
  children?: TaskProps[];
  level?: number; // 层级深度
  expanded?: boolean; // 是否展开
}

export interface FlattenedTask extends TaskProps {
  level: number;
  expanded: boolean;
  visible: boolean; // 是否可见（用于虚拟滚动）
}
